/**
* WordPress dependencies.
*/
import { __ } from '@wordpress/i18n';
import { addFilter } from '@wordpress/hooks';
import { PanelBody, TextControl, ToggleControl } from '@wordpress/components';
/**
* Internal dependencies.
*/
import BaseControl from '../../assets/components/base-control';
import useBlockControlProps from '../../assets/hooks/use-block-control-props';
/**
* Control render in editor.
*/
addFilter('lzb.editor.control.toggle.render', 'lzb.editor', (render, props) => (
));
/**
* Control settings render in constructor.
*/
addFilter(
'lzb.constructor.control.toggle.settings',
'lzb.constructor',
(render, props) => {
const { updateData, data } = props;
return (
<>
updateData({ alongside_text: value })
}
/>
updateData({
checked: value ? 'true' : 'false',
})
}
/>
>
);
}
);
{"code":"rest_no_route","message":"No route was found matching the URL and request method.","data":{"status":404}}